<?xml version="1.0"?>
<rss version="2.0">
  <channel><title>An Introduction to Monger</title><link>http://bill.welliver.org//space/pike/Monger User</link><description>One of the exciting new features available in Pike 7.6 is the addition of Monger. Monger is a tool designed to ease module management for Pike installations. By accessing data stored in a Pike Module Repository, Monger provides access to official and third party modules in real time. The current version of Monger provides 3 modes: List, Query and Install. We'll discuss each mode in turn below.&lt;p class="paragraph"/&gt;
&lt;h3 class="heading-1.1"&gt;General Information&#xD;&lt;/h3&gt;
Monger is available as part of all Pike 7.6 installations. Currently, Monger is a command line utility, and can be accessed using the following command:&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
     pike -x monger&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
By default, monger will query the module repository at modules.gotpike.org:8000, however you can change the repository by providing it on the command line:&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
     pike -x monger --repository=host:port&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
&lt;b class="bold"&gt;List Mode&lt;/b&gt;&lt;p class="paragraph"/&gt;
List mode allows you to see a list of the modules in the repository, optionally limited by a substring.&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
     pike -x monger --list &amp;#91;subphrase]&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
By running the list command without any additional arguments, you will get a list of all modules in the repository. If you wish to see modules in the repository whose name contains a given string, you can provide it after the list command. For example:&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
     pike -x monger --list Public&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
This command will provide a list of all modules in the repository whose name contains the phrase "Public".&lt;p class="paragraph"/&gt;
&lt;b class="bold"&gt;Query Mode&lt;/b&gt;&lt;p class="paragraph"/&gt;
Query mode allows you to view detailed information about a particular module in the repository. The query will include information about recommended versions of the module for your Pike installation.&lt;p class="paragraph"/&gt;
For example:&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
     pike -x monger --query Public.Protocols.Jabber&#xD;
     Selecting recommended version 1.0 &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; query.&#xD;
     Public.Protocols.Jabber: This module provides a client &lt;b&gt;&lt;font color=darkgreen&gt;int&lt;/font&gt;&lt;/b&gt;&lt;b&gt;&lt;font color=darkbrown&gt;erface&lt;/font&gt;&lt;/b&gt; to Jabber &#xD;
        Instant Messaging (IM) servers.&#xD;
     Author/Owner: Bill Welliver&#xD;
     Version: 1.0 (recommended)      License: GPL/LGPL/MPL&#xD;
     Changes: Initial Release of the Jabber Client module&lt;p class="paragraph"/&gt;
     This version supports plaintext authentication, presence, roster &#xD;
     management and send/receive messaging in an asynchronous environment &#xD;
     using callbacks. Connection using SSL is supported though largely &#xD;
     untested.&lt;p class="paragraph"/&gt;
     This module is available &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; automated installation. &#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
Use the &lt;tt class="monospace"&gt;&lt;strike class="strike"&gt;version&lt;/tt&gt; option to view a particular version, and &lt;tt class="monospace"&gt;&lt;/strike&gt;force&lt;/tt&gt; to force viewing of a particular version when it is not a recommended version (ie has a Pike dependency that is not satisfied by your version of Pike:&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
     pike -x monger --query --version=1.1 System.PAM&#xD;
     Requested version 1.1 is not the recommended version.&#xD;
     use --force to force query of this version.&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
&lt;b class="bold"&gt;Install Mode&lt;/b&gt;&lt;p class="paragraph"/&gt;
One of the most useful features of Monger is its Install mode. Install mode is similar in many ways to the install command available in Perl's CPAN module. This mode allows you to automate the potentially tedious job of installing a module from source.&lt;p class="paragraph"/&gt;
In order to use monger to install modules automatically, you must have the following in your PATH:&#xD;
&lt;ul class="minus"&gt;
&lt;li&gt;gzip&lt;/li&gt;
&lt;li&gt;tar&lt;/li&gt;
&lt;li&gt;make&lt;/li&gt;
&lt;li&gt;the c compiler you used to compile pike; usually gcc&lt;/li&gt;
&lt;/ul&gt;Monger will retrieve query the module repository for the best version of the module you want, download, build and finally install it. After a successful install, Monger will clean up after itself. If the build fails, Monger will leave the files it downloaded in case you wish to try to build the module manually.&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
pike -x monger --install IP.v4&#xD;
Selecting recommended version 0.2 &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; install.&#xD;
beginning download of version 0.2...&#xD;
wrote module to file IP_v4-0.2.tar.gz (15786 bytes)&#xD;
uncompressing...IP_v4-0.2.tar.gz&#xD;
working with tar file IP_v4-0.2.tar&#xD;
IP_v4-0.2/&#xD;
IP_v4-0.2/CVS/&#xD;
IP_v4-0.2/CVS/Entries&#xD;
IP_v4-0.2/CVS/Repository&#xD;
IP_v4-0.2/CVS/Root&#xD;
IP_v4-0.2/CVS/Template&#xD;
IP_v4-0.2/module.pmod.in/&#xD;
IP_v4-0.2/module.pmod.in/Address.pike&#xD;
IP_v4-0.2/module.pmod.in/Prefix.pike&#xD;
IP_v4-0.2/module.pmod.in/Protocol.pike&#xD;
IP_v4-0.2/module.pmod.in/Tuple.pike&#xD;
IP_v4-0.2/module.pmod.in/helpers.pike&#xD;
IP_v4-0.2/module.pmod.in/module.pmod&#xD;
IP_v4-0.2/configure.in&#xD;
IP_v4-0.2/Makefile.in&#xD;
IP_v4-0.2/configure&#xD;
IP_v4-0.2/testsuite.in&#xD;
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike all&#xD;
cd . &amp;amp;&amp;amp; /usr/local/pike/7.6.25/include/pike/run_autoconfig .&#xD;
Running autoconf in .&#xD;
AR=&lt;i&gt;&lt;font color=darkred&gt;""&lt;/font&gt;&lt;/i&gt; CFLAGS=&lt;i&gt;&lt;font color=darkred&gt;"-g -Wa,--execstack -mcpu=i686"&lt;/font&gt;&lt;/i&gt; LDFLAGS=&lt;i&gt;&lt;font color=darkred&gt;"-L/usr/local/src/pike-7.6.25/src/bundles/lib -z execstack -R/usr/local/lib -L/usr/local/lib -R/usr/X11R6/lib -L/usr/X11R6/lib"&lt;/font&gt;&lt;/i&gt; LDSHARED=&lt;i&gt;&lt;font color=darkred&gt;"gcc -shared  "&lt;/font&gt;&lt;/i&gt; CPPFLAGS=&lt;i&gt;&lt;font color=darkred&gt;"-I/usr/local/src/pike-7.6.25/src/bundles/include -I/usr/local/include -I/usr/X11R6/include"&lt;/font&gt;&lt;/i&gt; BUILDDIR=&lt;i&gt;&lt;font color=darkred&gt;""&lt;/font&gt;&lt;/i&gt; BINDIR=&lt;i&gt;&lt;font color=darkred&gt;"/usr/local/pike/7.6.25/include/pike"&lt;/font&gt;&lt;/i&gt; PIKE_SRC_DIR=&lt;i&gt;&lt;font color=darkred&gt;"/usr/local/pike/7.6.25/include/pike"&lt;/font&gt;&lt;/i&gt; BUILD_BASE=&lt;i&gt;&lt;font color=darkred&gt;"/usr/local/pike/7.6.25/include/pike"&lt;/font&gt;&lt;/i&gt; ./config.status --recheck&#xD;
running /bin/sh ./configure  &lt;strike class="strike"&gt;cache-file=./config.cache --with-cdebug --without-bundles CFLAGS=-g -Wa,&lt;/strike&gt;execstack -mcpu=i686 CPPFLAGS=-I/usr/local/src/pike-7.6.25/src/bundles/include -I/usr/local/include -I/usr/X11R6/include LDFLAGS=-L/usr/local/src/pike-7.6.25/src/bundles/lib -z execstack -R/usr/local/lib -L/usr/local/lib -R/usr/X11R6/lib -L/usr/X11R6/lib  --no-create --no-recursion&#xD;
configure: loading cache ./config.cache&lt;p class="paragraph"/&gt;
&lt;font color=brown&gt;###################################################&#xD;
&lt;/font&gt;&lt;font color=brown&gt;## Configuring module: IP_v4-0.2&#xD;
&lt;/font&gt;&lt;font color=brown&gt;## Installation dir:   &#xD;
&lt;/font&gt;&#xD;
checking &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; C compiler &lt;font color=black&gt;default&lt;/font&gt; output file name&amp;#8230; a.out&#xD;
checking whether the C compiler works&amp;#8230; yes&#xD;
checking whether we are cross compiling&amp;#8230; no&#xD;
checking &lt;font color=black&gt;&lt;/font&gt;&lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; suffix of executables&amp;#8230; &#xD;
checking &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; suffix of &lt;b&gt;&lt;font color=darkgreen&gt;object &lt;/font&gt;&lt;/b&gt;&lt;b&gt;&lt;font color=darkbrown&gt;files...&lt;/font&gt;&lt;/b&gt; (cached) o&#xD;
checking whether we are using the GNU C compiler&amp;#8230; (cached) yes&#xD;
checking whether /usr/local/pike/7.6.25/include/pike/smartlink gcc accepts -g&amp;#8230; (cached) yes&#xD;
checking &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; /usr/local/pike/7.6.25/include/pike/smartlink gcc option to accept ANSI C&amp;#8230; (cached) none needed&#xD;
checking &lt;b&gt;&lt;font color=darkblue&gt;if&lt;/font&gt;&lt;/b&gt; we are using TCC (TenDRA C Compiler)&amp;#8230; (cached) no&#xD;
checking how to run the C preprocessor&amp;#8230; (cached) gcc -E&#xD;
checking whether make sets $(MAKE)&amp;#8230; (cached) yes&#xD;
checking &lt;b&gt;&lt;font color=darkblue&gt;for&lt;/font&gt;&lt;/b&gt; the Pike base directory&amp;#8230; /usr/local/pike/7.6.25/include/pike&#xD;
configure: creating ./config.status&#xD;
CONFIG_FILES=&lt;i&gt;&lt;font color=darkred&gt;"make_variables:/usr/local/pike/7.6.25/include/pike/make_variables.in"&lt;/font&gt;&lt;/i&gt; CONFIG_HEADERS=&lt;i&gt;&lt;font color=darkred&gt;""&lt;/font&gt;&lt;/i&gt; ./config.status&#xD;
config.status: creating make_variables&#xD;
CONFIG_FILES=Makefile CONFIG_HEADERS=&lt;i&gt;&lt;font color=darkred&gt;""&lt;/font&gt;&lt;/i&gt; ./config.status&#xD;
config.status: creating Makefile&#xD;
touch remake&#xD;
Run make again&#xD;
make: *** &amp;#91;Makefile] Error 1&#xD;
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike all&#xD;
Making module.pmod&#xD;
make all successful.&#xD;
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike verify&#xD;
make&amp;#91;1]: Entering directory `/home/bertrand/.monger/IP_v4-0.2'&#xD;
if test ! -d &lt;i&gt;&lt;font color=darkred&gt;"./plib/modules"&lt;/font&gt;&lt;/i&gt; ; then &amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;  mkdir -p ./plib/modules ; &amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;fi; &lt;b&gt;&lt;font color=darkblue&gt;if&lt;/font&gt;&lt;/b&gt; test &lt;i&gt;&lt;font color=darkred&gt;"x"&lt;/font&gt;&lt;/i&gt; != &lt;i&gt;&lt;font color=darkred&gt;"x"&lt;/font&gt;&lt;/i&gt; ; then &amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;  /usr/local/pike/7.6.25/include/pike/install_module module.so ./plib/modules/IP.pmod/_v4.so ;&amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;fi; &amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;&lt;b&gt;&lt;font color=darkblue&gt;if&lt;/font&gt;&lt;/b&gt; test &lt;i&gt;&lt;font color=darkred&gt;"xmodule.pmod.in"&lt;/font&gt;&lt;/i&gt; != &lt;i&gt;&lt;font color=darkred&gt;"x"&lt;/font&gt;&lt;/i&gt;; then &amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;  /usr/local/pike/7.6.25/include/pike/install_module module.pmod ./plib/modules/IP.pmod/v4.pmod ;&amp;amp;&lt;font color=brown&gt;#13;
&lt;/font&gt;fi&#xD;
make&amp;#91;1]: Leaving directory `/home/bertrand/.monger/IP_v4-0.2'&#xD;
pike -Mplib/modules /usr/local/pike/7.6.25/include/pike/test_pike.pike testsuite&#xD;
Doing tests in testsuite (0 tests)&#xD;
Total tests: 0  (0 tests skipped)       &#xD;
make verify successful.&#xD;
 make PIKE_INCLUDES=-I/usr/local/pike/7.6.25/include/pike PIKE_SRC_DIR=/usr/local/pike/7.6.25/include/pike BUILD_BASE=/usr/local/pike/7.6.25/include/pike MODULE_BASE=/usr/local/pike/7.6.25/include/pike TMP_BINDIR=/usr/local/pike/7.6.25/include/pike SRCDIR=. FULL_SRCDIR=/home/bertrand/.monger/IP_v4-0.2/ TMP_MODULE_BASE=. PIKE_EXTERNAL_MODULE=pike_external_module CORE_AUTODOC_PATH=/usr/local/pike/7.6.25/doc/src/core_autodoc.xml SYSTEM_DOC_PATH=/usr/local/pike/7.6.25/doc/ SYSTEM_MODULE_PATH=/usr/local/pike/7.6.25/lib/modules LOCAL_MODULE_PATH=$$HOME/lib/pike/modules RUNPIKE=pike install&#xD;
make install successful.&#xD;
cleaning up IP_v4-0.2.tar&#xD;
removing directory IP_v4-0.2&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
The module IP.v4 is now installed:&lt;p class="paragraph"/&gt;
&lt;div class="code"&gt;&lt;pre&gt;&lt;pre&gt;&#xD;
pike&#xD;
Pike v7.6 release 25 running Hilfe v3.5 (Incremental Pike Frontend)&#xD;
&amp;gt; indices(IP.v4);&#xD;
(1) Result: ({ &lt;font color=red&gt;/* 8 elements */&lt;/font&gt;&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"_ _author"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"module"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"helpers"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"Tuple"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"Prefix"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"_ _version"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"Protocol"&lt;/font&gt;&lt;/i&gt;,&#xD;
                &lt;i&gt;&lt;font color=darkred&gt;"Address"&lt;/font&gt;&lt;/i&gt;&#xD;
            })&#xD;
&lt;/pre&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"/&gt;
&#xD;
Note that monger (and the underlying build process) will use whatever compiler settings were used when the pike software was built. If you need to change them (for instance if you install a library in a new location), you will need to edit the specs file in the /path/to/pike/include/pike directory. Be careful when editing this file, as you can easily break the build process. Always make a backup copy of the specs file.&lt;p class="paragraph"/&gt;
&lt;b class="bold"&gt;Developer Tools&lt;/b&gt;&lt;p class="paragraph"/&gt;
Recent versions of Monger provide tools for manipulating the module repository programmatically. This allows (for example) new module versions to be added to the repository from within a release creation script. Details for this functionality can be found in the Monger Developer documentation.&lt;p class="paragraph"/&gt;
&lt;b class="bold"&gt;Drawbacks&lt;/b&gt;&lt;p class="paragraph"/&gt;
While Monger is a very useful tool, it does have a few shortcomings. Hopefully, these will be addressed in subsequent releases of Pike.&#xD;
&lt;ul class="minus"&gt;
&lt;li&gt;Monger requires an active connection to the internet during operation.&lt;/li&gt;
&lt;li&gt;Retrieved module distributions and data are not cached on the local client.&lt;/li&gt;
&lt;li&gt;Data is not verified for authenticity using checksums.&lt;/li&gt;
&lt;li&gt;Documentation is not automatically generated.&lt;/li&gt;
&lt;li&gt;There is no interactive mode.&lt;/li&gt;
&lt;li&gt;Settings are not currently saved.&lt;/li&gt;
&lt;/ul&gt;</description><generator>Fins 0.9.7</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs></channel>
</rss>
